package com.my.study.designPatterns.compoundPattern;

public class QuackCounter implements Quackable {

    private Quackable quackable;

    public static int numberOfQuack = 0;


    public QuackCounter(Quackable quackable) {
        this.quackable = quackable;
    }


    @Override
    public void quack() {
        quackable.quack();
        numberOfQuack++;
    }

    public int getNumberOfQuack(){
        return this.numberOfQuack;
    }


    @Override
    public void registerObserver(DuckObserver observer) {

    }

    @Override
    public void notifyObservers() {

    }
}
